//
//  ModifyPasswordController.m
//  easystudy
//
//  Created by kane on 16/8/31.
//  Copyright © 2016年 kane. All rights reserved.
//

#import "ModifyPasswordController.h"

@interface ModifyPasswordController ()
{
    __weak IBOutlet UIView *phoneView;
    __weak IBOutlet UITextField *phoneTF;
    
    __weak IBOutlet UIView *codeView;
    __weak IBOutlet UITextField *codeTF;
    __weak IBOutlet UIButton *commitBtn;
}

@end

@implementation ModifyPasswordController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.edgesForExtendedLayout = UIRectEdgeNone;
    
    self.title = @"修改密码";
    
    UIBarButtonItem *leftBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"image_backBtn"] style:UIBarButtonItemStylePlain target:self action:@selector(backBtn)];
    self.navigationItem.leftBarButtonItem = leftBtn;
    
    [phoneView drawCornerRadius:5];
    [phoneView drawBorderColor:[UIColor lightGrayColor] Width:1];
    
    [codeView drawCornerRadius:5];
    [codeView drawBorderColor:[UIColor lightGrayColor] Width:1];
    [commitBtn drawCornerRadius:5];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewWillAppear:(BOOL)animated
{
    self.navigationController.navigationBarHidden = NO;
    [super viewWillAppear:animated];
}

- (void)backBtn
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (IBAction)commitBtn:(id)sender
{
    [UserEntity sharedUser].Password = codeTF.text;
    [self.navigationController popToRootViewControllerAnimated:YES];
}

@end
